import config from "@/config"
import http from "@/utils/request"

export default {
	policyType:{
		getPolicyTypeList:{
			url: `${config.API_URL}/api/policy/type/getPolicyTypeList`,
			name: "查询政策类型",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		savePolicyType:{
			url: `${config.API_URL}/api/policy/type/savePolicyType`,
			name: "保存政策类型",
			post: async function (data) {
				return await http.post(this.url, data, {headers: {}});
			}
		},
		updatePolicyType:{
			url: `${config.API_URL}/api/policy/type/updatePolicyType`,
			name: "更新政策类型",
			post: async function (data) {
				return await http.post(this.url, data, {headers: {}});
			}
		},
		deletePolicyType:{
			url: `${config.API_URL}/api/policy/type/deletePolicyType`,
			name: "删除政策类型",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		batchDeletePolicyType:{
			url: `${config.API_URL}/api/policy/type/batchDeletePolicyType`,
			name: "删除政策类型",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		getExpPolicyType:{
			url: `${config.API_URL}/api/policy/type/getExpPolicyType`,
			name: "导出政策类型",
			fileDownload: async function (data) {
				return await http.fileDownload(this.url, data,{
					headers: {}
				})
			}
		},
	},
	policyApply:{
		getPolicyApplyList:{
			url: `${config.API_URL}/api/policy/apply/getPolicyApplyList`,
			name: "查询政策申请",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		savePolicyApply:{
			url: `${config.API_URL}/api/policy/apply/savePolicyApply`,
			name: "保存政策申请",
			post: async function (data) {
				return await http.post(this.url, data, {headers: {}});
			}
		},
		updatePolicyApply:{
			url: `${config.API_URL}/api/policy/apply/updatePolicyApply`,
			name: "更新政策申请",
			post: async function (data) {
				return await http.post(this.url, data, {headers: {}});
			}
		},
		deletePolicyApply:{
			url: `${config.API_URL}/api/policy/apply/deletePolicyApply`,
			name: "删除政策申请",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		batchDeletePolicyApply:{
			url: `${config.API_URL}/api/policy/apply/batchDeletePolicyApply`,
			name: "删除政策申请",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
		getExpPolicyApply:{
			url: `${config.API_URL}/api/policy/apply/getExpPolicyApply`,
			name: "导出政策申请",
			fileDownload: async function (data) {
				return await http.fileDownload(this.url, data,{
					headers: {}
				})
			}
		},
		updatePolicyApplyStatus:{
			url: `${config.API_URL}/api/policy/apply/updatePolicyApplyStatus`,
			name: "更新审批状态",
			get: async function (params) {
				return await http.get(this.url, params);
			}
		},
	}
}